3.73 \(\int \cos (a+b x^n) \, dx\)

Optimal. Leaf size=83 \[ -\frac{e^{i a} x \left (-i b x^n\right )^{-1/n} \text{Gamma}\left (\frac{1}{n},-i b x^n\right )}{2 n}-\frac{e^{-i a} x \left (i b x^n\right )^{-1/n} \text{Gamma}\left (\frac{1}{n},i b x^n\right )}{2 n} \]

[Out]

-(E^(I*a)*x*Gamma[n^(-1), (-I)*b*x^n])/(2*n*((-I)*b*x^n)^n^(-1)) - (x*Gamma[n^(-1), I*b*x^n])/(2*E^(I*a)*n*(I*
b*x^n)^n^(-1))

________________________________________________________________________________________

Rubi [A]  time = 0.0216957, antiderivative size = 83, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 8, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {3366, 2208} \[ -\frac{e^{i a} x \left (-i b x^n\right )^{-1/n} \text{Gamma}\left (\frac{1}{n},-i b x^n\right )}{2 n}-\frac{e^{-i a} x \left (i b x^n\right )^{-1/n} \text{Gamma}\left (\frac{1}{n},i b x^n\right )}{2 n} \]

Antiderivative was successfully verified.

[In]

Int[Cos[a + b*x^n],x]

[Out]

-(E^(I*a)*x*Gamma[n^(-1), (-I)*b*x^n])/(2*n*((-I)*b*x^n)^n^(-1)) - (x*Gamma[n^(-1), I*b*x^n])/(2*E^(I*a)*n*(I*
b*x^n)^n^(-1))

Rule 3366

Int[Cos[(c_.) + (d_.)*((e_.) + (f_.)*(x_))^(n_)], x_Symbol] :> Dist[1/2, Int[E^(-(c*I) - d*I*(e + f*x)^n), x],
 x] + Dist[1/2, Int[E^(c*I + d*I*(e + f*x)^n), x], x] /; FreeQ[{c, d, e, f, n}, x]

Rule 2208

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^(n_)), x_Symbol] :> -Simp[(F^a*(c + d*x)*Gamma[1/n, -(b*(c + d*x)
^n*Log[F])])/(d*n*(-(b*(c + d*x)^n*Log[F]))^(1/n)), x] /; FreeQ[{F, a, b, c, d, n}, x] &&  !IntegerQ[2/n]

Rubi steps

\begin{align*} \int \cos \left (a+b x^n\right ) \, dx &=\frac{1}{2} \int e^{-i a-i b x^n} \, dx+\frac{1}{2} \int e^{i a+i b x^n} \, dx\\ &=-\frac{e^{i a} x \left (-i b x^n\right )^{-1/n} \Gamma \left (\frac{1}{n},-i b x^n\right )}{2 n}-\frac{e^{-i a} x \left (i b x^n\right )^{-1/n} \Gamma \left (\frac{1}{n},i b x^n\right )}{2 n}\\ \end{align*}

Mathematica [A]  time = 0.0900201, size = 92, normalized size = 1.11 \[ -\frac{x \left (b^2 x^{2 n}\right )^{-1/n} \left ((\cos (a)-i \sin (a)) \left (-i b x^n\right )^{\frac{1}{n}} \text{Gamma}\left (\frac{1}{n},i b x^n\right )+(\cos (a)+i \sin (a)) \left (i b x^n\right )^{\frac{1}{n}} \text{Gamma}\left (\frac{1}{n},-i b x^n\right )\right )}{2 n} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[a + b*x^n],x]

[Out]

-(x*(((-I)*b*x^n)^n^(-1)*Gamma[n^(-1), I*b*x^n]*(Cos[a] - I*Sin[a]) + (I*b*x^n)^n^(-1)*Gamma[n^(-1), (-I)*b*x^
n]*(Cos[a] + I*Sin[a])))/(2*n*(b^2*x^(2*n))^n^(-1))

________________________________________________________________________________________

Maple [C]  time = 0.092, size = 75, normalized size = 0.9 \begin{align*} x{\mbox{$_1$F$_2$}({\frac{1}{2\,n}};\,{\frac{1}{2}},1+{\frac{1}{2\,n}};\,-{\frac{{x}^{2\,n}{b}^{2}}{4}})}\cos \left ( a \right ) -{\frac{b{x}^{1+n}\sin \left ( a \right ) }{1+n}{\mbox{$_1$F$_2$}({\frac{1}{2}}+{\frac{1}{2\,n}};\,{\frac{3}{2}},{\frac{3}{2}}+{\frac{1}{2\,n}};\,-{\frac{{x}^{2\,n}{b}^{2}}{4}})}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(a+b*x^n),x)

[Out]

x*hypergeom([1/2/n],[1/2,1+1/2/n],-1/4*x^(2*n)*b^2)*cos(a)-b/(1+n)*x^(1+n)*hypergeom([1/2+1/2/n],[3/2,3/2+1/2/
n],-1/4*x^(2*n)*b^2)*sin(a)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \cos \left (b x^{n} + a\right )\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(a+b*x^n),x, algorithm="maxima")

[Out]

integrate(cos(b*x^n + a), x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\cos \left (b x^{n} + a\right ), x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(a+b*x^n),x, algorithm="fricas")

[Out]

integral(cos(b*x^n + a), x)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \cos{\left (a + b x^{n} \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(a+b*x**n),x)

[Out]

Integral(cos(a + b*x**n), x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \cos \left (b x^{n} + a\right )\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(a+b*x^n),x, algorithm="giac")

[Out]

integrate(cos(b*x^n + a), x)